// Changes(fbarchard): Ported to C++ and Google style guide.
// Made context first parameter in MD5Final for consistency with Sha1.

#ifndef BASE_MD5_H_
#define BASE_MD5_H_

#include "basictypes.h"

// Canonical name for a MD5 context structure, used in many crypto libs.
typedef struct MD5Context MD5_CTX;
struct MD5Context {
	uint32 buf[4];
	uint32 bits[2];
	uint32 in[16];
};

void MD5Init(MD5Context* context);
void MD5Update(MD5Context* context, const uint8* data, size_t len);
void MD5Final(MD5Context* context, uint8 digest[16]);
void MD5Transform(uint32 buf[4], const uint32 in[16]);

#endif  // BASE_MD5_H_